<?php
namespace Admin\Controller;

use Common\Controller\CoreController;

/**
 * Created by IntelliJ IDEA.
 * User: fanxu(746439274@qq.com)
 * Date: 15/7/6
 * Time: 下午11:51
 */

class LockController extends CoreController{

    public function index(){
        layout(false);
        $this->display();
    }

    public function look(){
        $password = I('post.passwd');
        if( empty( $password ) ){
            return $this->jsonReturn('查看码不正确~',0);
        }
        switch( $password ){
            case 'fanxu103':

                break;
            default:
                cookie('can_look',false);
                return $this->jsonReturn('查看码不正确~',0);
                break;
        }
        cookie('can_look',true);
        return $this->jsonReturn([
            'url' => '/Home/Index/index.html'
        ],1);
    }

}